package com.indusfo.spc.pojo;

import com.indusfo.spc.common.pojo.BasePojo;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 部门实现类
 *
 * @author xuz
 * @date 2018/11/22 9:58 AM
 */
@Table(name="sys_dep")  //类和表的映射
public class Dep extends BasePojo {

  private static final long serialVersionUID = 8937371784095426075L;
  @Id
  @Column(name="dep_id",insertable=false)
  private Integer depId;    // 部门id
  /*部门代码*/
  private String depCode;

  /*部门名称*/
  private	String depName;

  //创建人
  private Integer userId;

  //创建翻译
  @Transient
  private String userName;

  //上级部门
  private Integer depPid;

  //备注
  private String remark;

  //状态
  private Integer dataState;

  // 数据状态(翻译)
  @Transient
  private String dataStateName;

  /*创建时间*/
  private Date createDate;

  /*更改时间*/
  private Date modifyDate;

  //标记
  @Transient
  private Integer flag;




  public Integer getDepId() {
    return depId;
  }

  public void setDepId(Integer depId) {
    this.depId = depId;
  }

  public String getDepCode() {
    return depCode;
  }

  public void setDepCode(String depCode) {
    this.depCode = depCode== null ? null : depCode.trim().replace(" ","");
  }

  public String getDepName() {
    return depName;
  }

  public void setDepName(String depName) {
    this.depName = depName == null ? null : depName.trim().replace(" ","");
  }

  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public Integer getDepPid() {
    return depPid;
  }

  public void setDepPid(Integer depPid) {
    this.depPid = depPid;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark== null ? null : remark.trim().replace(" ","");
  }

  public Integer getDataState() {
    return dataState;
  }

  public void setDataState(Integer dataState) {
    this.dataState = dataState;
  }

  public String getDataStateName() {
    return dataStateName;
  }

  public void setDataStateName(String dataStateName) {
    this.dataStateName = dataStateName;
  }

  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  public Date getModifyDate() {
    return modifyDate;
  }

  public void setModifyDate(Date modifyDate) {
    this.modifyDate = modifyDate;
  }

  public Integer getFlag() {
    return flag;
  }

  public void setFlag(Integer flag) {
    this.flag = flag;
  }
}
